package com.szq.pattern.impl;

import com.szq.pattern.Expression;

/**
 * @description:
 * @author: szq
 * @date: 2021-09-15 08:16:40
 */
public class TerminalExpression implements Expression {

    private String data;

    public TerminalExpression(String data) {
        this.data = data;
    }

    @Override
    public boolean interpreter(String con) {
        if (con.contains(data)){
            return true;
        }
        return false;
    }
}
